﻿namespace theeg.GeometryWpf
{
    public interface IHilbertTreeNode
    {
        double CenterX { get; }
        double CenterY { get; }

        /// <summary>
        ///Get the minimum axis parallel rectangle, which contains the object (edge or node)
        /// </summary>
        /// <returns></returns>
        ComputationalRectangle GetBoundingBox();

        /// <summary>
        /// Check whether the tree node datas area contains the area of a given shape.
        /// </summary>
        /// <param name="range">the shape to test</param>
        /// <returns>Contains, Outside or Overlaps</returns>
        ShapeOverlapping Contains(ComputationalShape range);

        /// <summary>
        /// Calculates the distance of a point to the tree nodes area.
        /// </summary>
        /// <param name="pt">a point to check</param>
        /// <returns>the calculated distance. 0 if the point is inside the area.</returns>
        double GetDistanceFrom(System.Windows.Point pt);

        /// <summary>
        /// Gets a value to determine, whether the node shall be treated as visible,
        /// far away or fully visible.
        /// </summary>
        /// <returns>by default the diagonal of bounding box</returns>
        double GetLevelOfDetailFactor();

        int Category { get; }
    }
}
